package day0515;

public class TestCar {
    public static void main(String[] args) {
        //1. 创建对象
        Car c=new Car();
        //2.四个变量赋值
        c.brand="honda";
        c.price=10000;
        c.color="red";
        c.passengerNum=4;
        //3.调用方法
        String msg=c.getMessage();
        System.out.println(msg);

        c.start();
        c.beDrive();
        c.stop();

        //调用Driver里边drive()方法
        Driver zs=new Driver();
        zs.name="张三";
        zs.drive(c);
    }
}
